-
Notifications
You must be signed in to change notification settings - Fork 6
add travel reimbursement form changes #226
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
* This component accepts <code>application</code> via props, rather than via | ||
* <code>useApplicationContext</code>, because it requires the application to already be loaded before being rendered. | ||
*/ | ||
function travelReimbursmentForm({ application }: { application: Application }) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
function travelReimbursmentForm({ application }: { application: Application }) { | |
function TravelReimbursmentForm({ application }: { application: Application }) { |
React component names must be named in PascalCase
}) | ||
|
||
async function onSubmit(values: z.infer<typeof travelReimbursmentFormSchema>): Promise<void> { | ||
await updateApplication("personal", values) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this needs to be removed/replaced with something that creates/updates the travel reimbursement request - it's fine for that function to be a placeholder for now
</div> | ||
</div> | ||
<div className="mt-16 flex justify-center"> | ||
<FormSubmitButton type="submit">Save Progress</FormSubmitButton> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Submit button should probably be more like 'submit travel reimbursement request'
} | ||
|
||
function TravelReimbursmentFormSkeleton() { | ||
return <FormSkeleton rows={3} className="mt-2" /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The number of rows in the skeleton should ultimately match the number of fields in the form - the fields in the form will be changing though, so that's okay
return <TravelReimbursmentFormSkeleton /> | ||
} | ||
|
||
return <TravelReimbursmentFormSkeleton application={application} /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Once the application is loaded, you should return the actual form component, not just the skeleton
No description provided.